$('#close').on('click', () => {
    window.ipcRenderer.send("closeAddServe");
})
const channel = new BroadcastChannel("passwordInput");
$(window).on('keydown', (event) => {
    if(event.keyCode == 13) {
        if(!$('#password').val().trim()) {
            window.ipcRenderer.send("connctError", [
                "error",
                "错误",
                "请输入密码",
                ["ok"],
              ]);
            return
        }
        channel.postMessage($('#password').val())
        window.ipcRenderer.send("closeAddServe");
    }
})